<?php
	require_once(realpath(dirname(__FILE__)) . "/Baseobj.class.php");

	class Port extends Baseobj{

		var $id;
		var $zone;
		var $poids;
		var $port;

		const TABLE="port";
		var $table=self::TABLE;

		var $bddvars=array("id", "zone", "poids", "port");

		function __construct(){
			parent::__construct();
		}


		function charger($id){
			return $this->getVars("select * from $this->table where id=\"$id\"");
		}

		function calcule($zone, $poids){
			$this->getVars("select * from $this->table where zone='" . $zone . "' and poids>='" . $poids . "' order by port limit 0,1");
			return $this->port;

		}
	}
?>